<?php
/**
 * --------------------------------------------------------------
 * 手册验证器
 * --------------------------------------------------------------
 * Light Year Doc
 * @author yinq<3331653644@qq.com>
 * --------------------------------------------------------------
 */
namespace app\admin\validate;

use think\Validate;

class Manual extends Validate
{
    protected $rule = [
        'title'      => "require|max:120|unique:manual",
        'route_name' => "require|max:20|unique:manual",
        'author'     => "max:32",
    ];

    protected $message = [
	    'title.require'      => '手册名称不能为空',
	    'title.max'          => '手册名称最大长度为120个字符',
	    'title.unique'       => '手册名称已经存在',
	    'route_name.require' => '路由名称不能为空',
	    'route_name.max'     => '路由名称最大长度为50个字符',
	    'route_name.unique'  => '路由名称已经存在',
	    'author.max'         => '作者姓名最大长度为32个字符',
    ];
}